#@adminLayout() #define main()
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-edit" >
			<input name="id"  type="hidden"  />
			<div class="form-group">
				<label class="col-sm-3 control-label ">名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="title" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="content" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
	<div class="row" id="btn">
		<div class="col-sm-offset-3 col-sm-10">
			<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
		</div>
	</div>
	<script type="text/javascript">
		var prefix = "#(ctx)/flow_demo";
		var id='#(id)';
    	$(function(){
			if(id!='')
			{
				$('#form-edit').loadForm(prefix+'/getData?id='+id);
			}

    	});
		function submitHandler() {
			if ($.validate.form()) {
				var options = {
					dataType : "json",
					url : prefix + "/save",
					data : {iswf:true},
					success : function(data) {
						if(data.code==0)
						{

						}
						$.modal.alert(data.msg);
					}
				};
				$("#form-edit").ajaxSubmit(options);
			}
	    }
	</script>
</body>
#end
